package com.ovidiojf.siesec.util;

import com.ovidiojf.siesec.aluno.AlunoDAO;
import com.ovidiojf.siesec.aluno.AlunoDAOHibernate;
import com.ovidiojf.siesec.classe.ClasseDAO;
import com.ovidiojf.siesec.classe.ClasseDAOHibernate;
import com.ovidiojf.siesec.escola.EscolaDAO;
import com.ovidiojf.siesec.escola.EscolaDAOHibernate;
import com.ovidiojf.siesec.matriculaEscolar.MatriculaEscolarDAO;
import com.ovidiojf.siesec.matriculaEscolar.MatriculaEscolarDAOHibernate;

public class DAOHibernateFactory {

	public static AlunoDAO createAlunoDAO() {

		AlunoDAOHibernate alunoDAOHibernate = new AlunoDAOHibernate();
		alunoDAOHibernate.setSession(HibernateUtil.getSessionfactory().getCurrentSession());
		
		return alunoDAOHibernate;
	}

	public static EscolaDAO createEscolaDAO() {

		EscolaDAOHibernate escolaDAOHibernate = new EscolaDAOHibernate();
		escolaDAOHibernate.setSession(HibernateUtil.getSessionfactory().getCurrentSession());
		
		return escolaDAOHibernate;
	}

	public static ClasseDAO createClasseDAO() {
		ClasseDAOHibernate classeDAOHibernate = new ClasseDAOHibernate();
		classeDAOHibernate.setSession(HibernateUtil.getSessionfactory().getCurrentSession());
		return classeDAOHibernate ;
	}

	public static MatriculaEscolarDAO createMatriculaEscolarDAOHibernate() {
		
		MatriculaEscolarDAOHibernate matriculaEscolarDAOHibernate = new MatriculaEscolarDAOHibernate();
		matriculaEscolarDAOHibernate.setSession(HibernateUtil.getSessionfactory().getCurrentSession());
		
		return matriculaEscolarDAOHibernate;
	}

}

